package annotation;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;

public class GoodStudent {

    @Autowired
    @Qualifier("student2")  //有两个Student Bean , 自动装配时发生了错误
    private Student student;

    public void getInfo() {
        System.out.println(student.getName() + " " + student.getAge() + " " +  student.getGrade().getiNumber());
    }
}
